home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 2
/
SPACE - Library 2 - Volume 1.iso
/
apps
/
471
/
applic
/
studio.doc
< prev
next >
Wrap
Text File
|
1990-05-18
|
8KB
|
230 lines
Sprite Studio
Sprite Studio is a low-res painting program written in GFA
Basic that incorporates several non-standard features useful in
creating sprites for animations as well as games. Sprite Studio
also has the ability to load any file as graphics (not just DEGAS
or Neochrome pictures). Each of the program's functions are
detailed below.
Getting Started
Double-click on the file STUDIO.PRG. When the groovy
title screen appears, click the mouse to begin.
The Menu
Sprite Studio is fully icon-driven. All of the program
functions are shown on one of two menus. The default menu is
a rectangle five icons wide and four icons tall. You can also use
a menu that is one icon tall and twenty icons wide (More on this
later). The descriptions of each menu item follow.
Disk
Controls the loading and saving of picture files. Two
standard picture types are available, Degas and Neochrome.
You can also choose to load a file as raw graphics data.
With this option, you can load any file you wish, from games
to text files (although I can't see what good a text file
would be to a paint program).
Draw
Allows you to draw freehand.
Fill
Allows you to pick one of the thirty-six standard ST fill
patterns. There are no user-defined fill patterns.
Airbrush
'Nuff said.
Palette
This is actually another menu in itself, allowing the user to
choose or define a color in the palette.
Frame
This creates open rectangles.
Box
This creates filled rectangles.
Circle
This creates open circles (no ovals).
Disc
This creates filled circles.
Magnify (The icon that most closely resembles a microscope)
Magnifies a thirty-two by fourty pixel area of the
workscreen.
Line
Draws lines.
Text
Allows you to choose four different sizes of the standard
system font. Text is then entered from the keyboard and may
be placed anywhere on the workscreen.
Line Size
Allows you to choose from eight different line sizes. This
affects the draw, airbrush, frame, box, circle, disc, and
line functions.
Move Screen (The funny-looking icon with four arrows.)
This allows you to scroll vertically and horizontally through
a picture that is larger than a standard picture file. The
arrow keys control direction and holding down the shift key
while using the arrows will make it scroll faster.
Block
This allows you to cut out a rectangular block of the screen
in either opaque or transparent mode. To copy a block between
workscreens, cut out the block and press the space bar.
Sprite (The funny-looking icon that resembles Tinkerbell.)
This function has a menu of it's own. The descriptions of
these items follow.
Append
This allows you to cut out a sprite from the
current workscreen and append it to the end of the
current list of sprites. A sprite file can contain
320 sprites.
Insert
This allows you to pick a place to insert a sprite
into the current list. To move through the list,
move the mouse left and right. When you are at the
spot you want, click the left button and cut out
the sprite to insert.
Delete
Allows you to choose a sprite using the above
method to delete from the list.
New
Erases ALL sprites in memory.
Browse
This allows you to look at the current list of
sprites using the mouse.
Capture
Copies a sprite from the sprite area onto a
workscreen for editing.
File
Allows you to load and save SPRITE STUDIO
compatible sprite files. When saving a sprite
file, you can elect to include masks for the
sprites or leave them out (Note that masks are
needed for transparent animations). Details of the
format of a sprite file are at the end of this
document.
Test Animation
This animates the sprites so as to give you an idea
of what your sprites will look like in action.
Grid
This allows you to instantly draw a grid of any size on
the current workscreen.
Erase
This erases the current workscreen in one fell swoop.
Change Menu
This changes the box menu to the bar menu and back
again.
Change Screen
This toggles between the two available workscreens.
Additional Program Notes:
Pressing the right mouse button will usually allow you to
exit any function without affecting the workscreen.
Menus can be moved anywhere on the screen by clicking the
left mouse button outside the menu at the location you want
it to occupy. This allows you to see the picture while you
decide which function you wish to use.
The file "STUDIO.SPR" must be in the same folder as
"SPRITE.GFA"
Files other than Degas or Neochrome format may not be loaded
into workscreen two.
Only one palette can be active at a time in Sprite Studio.
The palette used will be the palette of the last picture or
sprite file loaded.
********************* -- Updates in V1.5 -- **********************
Version 1.5, in addition to some minor changes, now includes a way
to set default values for fill pattern, line width, text size, and
block type (transparent or opaque). To invoke this function, just
press the right mouse button while on the main menu. A sub-menu
will appear. The buttons on this menu and their functions are as
follows: Left-most, small button - turns defaults mode on and
off. Fill - allows selection of a default fill pattern. Line -
selects default line size. Text - selects default text size.
Blok - selects default transparency or opacity of blocks.
******************************************************************
Sprite file format
The Sprite Studio sprite file format is detailed below.
Also, routines for loading a sprite file in GFA Basic follow.
The first item in a sprite file is the mask flag. It is a
number followed by a CR/LF. If it is a zero, masks are not
present. If it is a one, a mask follows each sprite in the file.
The next item is the number of sprites in the file. It is also a
number followed by CR/LF. The next thirty-two bytes contain a
standard sixteen-color palette using one word to describe each
color. (Example: $0777 for white.) Next are the actual sprites
with their masks. The first two bytes of each sprite or mask tell
how long each one is in bytes.
A GFA Basic routine for loading a sprite file looks like this:
OPEN "I",#1,"sprites.spr"
INPUT #1, mask%
INPUT #1, numsprites%
palette$=input$(32,#1)
FOR loop=0 TO 15
SETCOLOR loop,CVI(MID$(palette$,loop*2+1,2))
NEXT loop
FOR loop=1 TO numsprites%
sprite$(loop)=INPUT$(CVI(INPUT$(2,#1)),#1)
IF mask% = 1 THEN
mask$(loop)=INPUT$(CVI(INPUT$(2,#1)),#1)
ENDIF
NEXT loop
Of course, you have to dimension Sprite$() and Mask$() to the
proper sizes or you will get an "ARRAY NOT DIMENSIONED" error.
Also, if you are using Sprite Studio sprites with a language other
than GFA Basic, your sprites should be a multiple of sixteen
pixels wide in order to use VDI routines to display them. To
display your sprites with GFA Basic, use "PUT x,y,sprite$" for
opaque and "PUT x,y,mask$,4" followed by "PUT x,y,sprite$,6" for
transparent.
If you have any questions involving GFA Basic and the use of
sprites, feel free to write to me at:
Cory Chapman
4337 W Bethany Home Road
Phoenix, AZ 85301 (USA)
P.S. Be sure to enclose a self-addressed stamped envelope with
the proper postage.